import { IsEmail, IsNotEmpty } from 'class-validator';

export class CreateSendMailDto {
  id?: string;
  @IsNotEmpty({
    message: '内容不能为空',
  })
  content: string;
  @IsNotEmpty({
    message: '邮箱地址不能为空',
  })
  @IsNotEmpty({
    message: '邮箱地址不能为空',
  })
  @IsEmail({}, { message: '邮箱格式不正确' })
  emailAddress: string;
  @IsNotEmpty({
    message: '发送日期不能为空',
  })
  sendDate: string;
  isPublic: boolean;
  @IsNotEmpty({ message: '收件人姓名不能为空' })
  name: string;
}
